package 
{
	import base.ModuleBase;
	import flash.display.Sprite;
	import flash.events.Event;
	
	/**
	 * 各个模块类,记得改名字,不要叫main
	 * 
	 */
	public class TemplateMain extends ModuleBase 
	{
		
		public function TemplateMain():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			
		}
		
		/**
		 * @inheritDoc
		 */
		override public function open():void 
		{
			super.open();
			//your source for open this module
		}
		
		/**
		 * 因为主类会储存该类的唯一引用
		 * 确保调用close方法后其余的所有东西被释放
		 * @inheritDoc
		 */
		override public function close():void 
		{
			super.close();
			//your source for close this module
		}
	}
	
}